<template>
  <div>
    <div class="login-dom" v-if="!isLogin"  >
      <span>查看行情价格，请先登录喔～</span>
      <span class="loginBtn" @click="showloginway">立即登录</span>
    </div>
    <div  class="oppDom"  @click="closeShow" v-if="showlogin" round>
      <loginForm  class="loginmodules"></loginForm>
    </div>
  </div>
</template>

<script type="text/ecmascript-6">
import loginForm from "../components/login/index";
export default {
  components: {
    loginForm
  },
  data() {
    return {
      isLogin: this.$store.state.islogin,
      showlogin: false
    };
  },
  computed: {
    setshow(){
      return this.$store.state.nocaches.loginmoduleshow
    }
  },
  watch: {
    setshow(news,old){
    
      this.showlogin=news
    },
  },
  created () {
      this.$store.commit("muloginmoduleshow",false)
  },
 
  methods: {
    showloginway() {
      this.$store.commit("muloginmoduleshow",true)
    },
    closeShow(){
     this.$store.commit("muloginmoduleshow",false)
    }
  }
};
</script>

<style scoped lang="less">
.login-dom {
  position: fixed;
  bottom: 0;
  width: 100%;
  height: 1rem;
  // line-height: 1rem;
  z-index: 111;
  font-size: 0.3rem;
  background: rgba(255, 255, 255, 1);
  box-shadow: 0px -2px 8px 0px rgba(0, 0, 0, 0.1);
  color: rgba(228, 152, 41, 1);
  padding: 0 0.3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  .loginBtn {
    width: 2rem;
    height: 0.68rem;
    line-height: 0.68rem;
    text-align: center;
    color: #ffffff;
    background: rgba(228, 152, 41, 1);
    border-radius: 0.08rem;
  }
}
.loginmodules {
  padding: 0.5rem 0.3rem !important;
  border-radius: 0.1rem;
    background: #ffffff;
      // border-radius: .04rem;
}
.oppDom{
  position: fixed;
  z-index: 999999999999;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.1);
      background: rgba(0, 0, 0, 0.7);
    top: 0;
    left: 0;
    display: flex;
    justify-content: center;
    align-items: center;
   
}
</style>
